// 封装banner轮播图相关业务代码
import { ref, onMounted } from "vue";
import { getBannerAPI } from "@/apis/home";
// 获取轮播图数据
export const useBanner = () => {
  const bannerList = ref([]);
  onMounted(async () => {
    const res = await getBannerAPI(2);
    bannerList.value = res.result;
  });
  return {
    bannerList,
  };
};
